<script language="javascript" type="text/javascript">
$(document).ready(function(){	   
/*Apply default button style. */		
		$('#lbtnGenerateReport').button();		
		$('.gridButton').button();				
		var o = new Option('<?=date('Y')-1;?>', '<?=date('Y')-1;?>');$(o).html('<?=date('Y')-1;?>');$("#lstYear").append(o);
		var o = new Option('<?=date('Y');?>', '<?=date('Y');?>');$(o).html('<?=date('Y');?>');$("#lstYear").append(o);
		var o = new Option('<?=date('Y')+1;?>', '<?=date('Y')+1;?>');$(o).html('<?=date('Y')+1;?>');$("#lstYear").append(o);
		$('#lstYear').val('<?=date('Y');?>');		
		 $("#lbtnGenerateReport").click(function(e){
			e.preventDefault(); 
			var url = $(this).attr('href');
			var windowName = 'Report Viewer' +  $('#lstReport>option:selected').text();	
			var reportTitle = 'Report: ' + $('#lstReport>option:selected').text() + ' of ' + $('#lstYear').val();
			url = url + '?rpt=' + $('#lstReport').val()+'&year='+$('#lstYear').val()+'&reportTitle='+reportTitle;
			window.open(url, windowName, "height=600,width=1024,status=yes, toolbar=no, menubar=no, location=no");
		});
	});    
</script>

<div class="workspace_panel">
	<div class="workspace_panel_row">
	<div class="workspace_panel_cell">
		<div style="display:table; width:100%;">
			<div style="display:table-row">
				<div style="display:table-cell; width:20%;"><h1>Financial Reports</h1></div>
				<div style="display:table-cell; text-align:right;">					
					<a href="<?=$go_back_menu?>" class="gridButton">Go Back </a>										
				</div>
			</div>
		</div>			
	</div>
	</div>	
	<div class="workspace_panel_row">
		<div class="workspace_panel_cell">
		<h2> Search for Incomes </h2>
		<p> Use the fields to enter a search criteria.</p>
        <form id="form1" action="?<?=$_SERVER['QUERY_STRING']?>" method="post">
        <div class="frmContainer" style="width:50%;">            
        	<div class="frmRow">
	        	<div class="frmLabelCell">Choose a report</div>
				<div class="frmContentCell">
					<select name="lstReport" id="lstReport" class="controlListBox">
						<option value="1">Incomes vs Expenses</option>
						<option value="2">Costed By Enterprise Employee</option>
						<option value="3">Reimbursements</option>
						<option value="4">Reimbursements by Enterprise Employee</option>
					</select>
				</div>
			</div>
	        <div class="frmRow">
		        <div class="frmLabelCell">Year</div>
		        <div class="frmContentCell">
					<select name="lstYear" id="lstYear" class="controlListBox">									
					</select>
				</div>
	        </div>	        
            <div class="frmRow">
            	<div class="frmContentCell">&nbsp;</div>
                <div class="frmContentCell">					
                	<a href="modules/financialReports/reportviewerdsp.php" id="lbtnGenerateReport" name="lbtnGenerateReport" >Generate Report</a> <br/>
					<br/>					
				</div>
            </div>
	   	</div>						
		</form>
	</div>		
	</div>
 </div>
